/***************************************************************************
 *   Copyright (C) 2007 by Ivan Vasić                                      *
 *   ivasic@gmail.com                                                      *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
#ifndef DBEXCEPTION_H
#define DBEXCEPTION_H

#include <exception.h>

/**
 * @class DBException
 * @brief Izuzetak sa bazom podataka.
 * 
 * Izuzetak u DB layer-u u vezi sa bazom podataka.
 * 
 * @author Ivan Vasić <ivasic@gmail.com>
*/
class DBException : public Exception
{
	public:
		/**
		 * @brief Overloaded konstruktor
		 * @param msg - Inicijalizuje m_message. Poruka greške.  
		 * @param type - Tip izuzetka.
		 * @param filename - Inicijalizuje m_filename. Ime fajla gde se greška desila.
		 * @param methodName - Inicijalizuje m_methodName. Ime funkcije u kojoj se desila greška.
		 * @param lineNr - Inicijalizuje m_lineNumber. Linija u kodu gde se desila greška
		 * @param innerException - Inicijalizuje m_innerException.
		 */
		DBException(const QString& msg, ExceptionType type, const QString& filename = QString::null, const QString& methodName = QString::null, int lineNr = 0, Exception* innerException = 0);
		~DBException();

};

#endif
